package com.ym.controller.medical;

import com.ym.core.annotation.Log;
import com.ym.core.domain.APIResponse;
import com.ym.core.domain.BaseController;
import com.ym.medical.service.IInformationSV;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;

/**
 * 平台公告、医生接单后回复了你的消息、退款成功通知、医生发布的新话题Controller
 * 
 * @author ym
 * @date 2020-08-21
 */
@Api(tags = "medical-平台公告、医生接单后回复了你的消息、退款成功通知、医生发布的新话题")
@RestController("InformationPcController")
@Validated
@RequestMapping("/medical/Information")
public class InformationController extends BaseController {

    @Autowired
    private IInformationSV informationSV;

    @ApiOperation("删除平台公告、医生接单后回复了你的消息、退款成功通知、医生发布的新话题")
    @Log
    @PostMapping("/delete")
    public APIResponse delete(@RequestBody @Valid @NotNull Long[] ids) {
        int result = informationSV.deleteByIds(ids);
        return successData(result);
    }
}
